﻿import React from 'react'

export default class fetchDemo extends React.Component{

    constructor(data){
        super(data)
    }
    componentDidMount(){
            console.log(1);
	console.log(location.href);
        // console.log(fetch);
            fetch("http://iwenwiki.com/api/blueberrypai/getIndexBanner.php"
            ).then(data=>{
                // console.log(data);
                return data.json()
            }).then(res=>{
                console.log(res);
            })
    }
    render(){
        return(
            <div>
                <p>这是一个fetch组建</p>
            </div>
        )
    }
}